{include file="common/_meta" /}
<title>新建网站角色 - 管理员管理 </title>
<meta name="keywords" content="李志立，lizhilimaster@163.com">
<meta name="description" content="李志立，lizhilimaster@163.com">
</head>
<body>
	<article class="cl pd-20">
		<form action="" method="post" class="form form-horizontal" id="form-category-add-lizhili">
			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>角色名称：</label>
				<div class="formControls col-xs-9 col-sm-10">
					<input type="text" class="input-text" value="" placeholder="" id="title" name="title" datatype="*4-16" nullmsg="用户账户不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2">备注：</label>
				<div class="formControls col-xs-9 col-sm-10">
					<input type="text" class="input-text" value="" placeholder="" id="desc" name="desc">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3 col-sm-2">网站角色：</label>
				<div class="formControls col-xs-9 col-sm-10">
					<dl class="permission-list" id="lizhili">
						{volist name="datasort" id="vo"}
						<dt style="border-bottom: 1px solid #ffd8d8">
							<label>
								{if !$vo.zi}<input type="checkbox" value="{$vo.id}" id="f{$vo.id}" name="rules[]">{/if}
								{$vo.name}</label>
						</dt>
							{volist name="vo.zi" id="vo2"}
							<div class="check-box" value="{$vo2.id}" style="padding: 8px;">
								<label><input type="checkbox" class="f{$vo2.fid}" name="rules[]" value="{$vo2.id}">
									{$vo2.name}</label>
							</div>
							{/volist}
						{/volist}
					</dl>
				</div>
			</div>
			<div class="row cl">
				<div class="col-xs-8 col-sm-9 col-xs-offset-3 col-sm-offset-2">
					<button type="submit" class="btn btn-success radius"><i class="icon-ok"></i> 确定</button>
				</div>
			</div>
		</form>
	</article>
	{include file="common/_footer" /}
	<script type="text/javascript" src="__MANAGE__lib/jquery.validation/1.14.0/jquery.validate.js"></script>
	<script type="text/javascript" src="__MANAGE__lib/jquery.validation/1.14.0/validate-methods.js"></script>
	<script type="text/javascript" src="__MANAGE__lib/jquery.validation/1.14.0/messages_zh.js"></script>
	<script type="text/javascript">
		$(function() {
			$('.skin-minimal input').iCheck({
				checkboxClass: 'icheckbox-blue',
				radioClass: 'iradio-blue',
				increaseArea: '20%'
			});

			$("#form-category-add-lizhili").validate({
				rules: {
					title: {
						required: true,
					},
				},
				submitHandler:function(form) {
					$("input[type=\"submit\"]").addClass('disabled').attr("disabled",true);
					var index = layer.load(1, {
						shade: [0.1,'#fff'] //0.1透明度的白色背景
					});
					setTimeout(()=>{
						$("input[type=\"submit\"]").removeClass('disabled').attr("disabled",false);
						layer.close(index);
					},1000)
					form.submit();
				}
			});
		});
	</script>
</body>
</html>
